import time

from selenium.webdriver.common.by import By

from add_member.page_objects.base_page import BasePage
import allure
import logging
class MainPage(BasePage):



    _BTN_ADDRESS_LIST = (By.LINK_TEXT, '通讯录')

    _BTN_ADD_MEMBER = (By.LINK_TEXT, '添加成员')
    with allure.step("1.首页点击通讯录 2.通讯录页面点击添加成员"):
        logging.info("点击通讯录")
        logging.info("点击添加成员")
        def click_add_member_button(self):
            print("点击通讯录")
            print("点击添加成员按钮")

            from add_member.page_objects.member_page import MemberPage
            time.sleep(8)

            self.do_click(*self._BTN_ADDRESS_LIST)

            self.do_click(*self._BTN_ADD_MEMBER)


            return MemberPage(self.driver)

